﻿using System;
using System.IO;
using System.ServiceModel;

namespace ExplorerService.Common.ServiceContracts
{
    [ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(IClientStreamingServiceCallback))]
    public interface IClientStreamingService
    {
        /// <summary>
        /// Registers a new uploadStream
        /// </summary>
        /// <returns>The new ID of the stream</returns>
        [OperationContract(IsInitiating = true, IsTerminating = false)]
        Guid BeginUploadStream(Guid clientSessionId);


        /// <summary>
        /// Registers a new downloadStream
        /// </summary>
        /// <returns>The new ID of the stream</returns>
        [OperationContract(IsInitiating = true, IsTerminating = false)]
        Guid BeginDownloadStream(Guid clientSessionId);

        /// <summary>
        /// Ends the upload stream
        /// </summary>
        [OperationContract(IsInitiating = false, IsTerminating = true)]
        void EndStream();

       

    }
}
